package cn.heroes.weixin.pojo;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 * 消息(官方), 带了所有消息属性
 * 
 * @author cq
 * 
 */
@XmlRootElement(name = "xml")
public class Message {
	/** 接收方帐号（开发者微信号或用户的OpenID） */
	@XmlElement(name = "ToUserName")
	public String toUserName;
	/** 发送方帐号（开发者微信号或用户的OpenID） */
	@XmlElement(name = "FromUserName")
	public String fromUserName;
	/** 消息创建时间(格林威治时间) */
	@XmlElement(name = "CreateTime")
	public long createTime;
	/**
	 * 消息类型
	 * 
	 * @see cn.heroes.weixin.type.MessageType
	 */
	@XmlElement(name = "MsgType")
	public String msgType;
	/** 文本消息内容 */
	@XmlElement(name = "Content")
	public String content;
	/**
	 * 事件类型
	 * 
	 * @see cn.heroes.weixin.type.EventType
	 */
	@XmlElement(name = "Event")
	public String event;
	/** 事件KEY值 */
	@XmlElement(name = "EventKey")
	public String eventKey;
	/** 二维码的ticket，可用来换取二维码图片 */
	@XmlElement(name = "Ticket")
	public String ticket;
	/** 消息id，64位整型 */
	@XmlElement(name = "MsgId")
	public int msgId;
	/** 图片链接 */
	@XmlElement(name = "PicUrl")
	public String picURL;
	/** 图片消息媒体id，可以调用多媒体文件下载接口拉取数据。 */
	@XmlElement(name = "MediaId")
	public String mediaID;
	/** 语音格式，如amr，speex等 */
	@XmlElement(name = "Format")
	public String format;

	@XmlTransient
	public String getToUserName() {
		return toUserName;
	}

	public void setToUserName(String toUserName) {
		this.toUserName = toUserName;
	}

	@XmlTransient
	public String getFromUserName() {
		return fromUserName;
	}

	public void setFromUserName(String fromUserName) {
		this.fromUserName = fromUserName;
	}

	@XmlTransient
	public long getCreateTime() {
		return createTime;
	}

	public void setCreateTime(long createTime) {
		this.createTime = createTime;
	}

	@XmlTransient
	public String getMsgType() {
		return msgType;
	}

	public void setMsgType(String msgType) {
		this.msgType = msgType;
	}

	@XmlTransient
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@XmlTransient
	public int getMsgId() {
		return msgId;
	}

	public void setMsgId(int msgId) {
		this.msgId = msgId;
	}

	@XmlTransient
	public String getEvent() {
		return event;
	}

	public void setEvent(String event) {
		this.event = event;
	}

	@XmlTransient
	public String getEventKey() {
		return eventKey;
	}

	public void setEventKey(String eventKey) {
		this.eventKey = eventKey;
	}

	@XmlTransient
	public String getTicket() {
		return ticket;
	}

	public void setTicket(String ticket) {
		this.ticket = ticket;
	}

	public String getPicURL() {
		return picURL;
	}

	public void setPicURL(String picURL) {
		this.picURL = picURL;
	}

	public String getMediaID() {
		return mediaID;
	}

	public void setMediaID(String mediaID) {
		this.mediaID = mediaID;
	}

	public String getFormat() {
		return format;
	}

	public void setFormat(String format) {
		this.format = format;
	}

}
